The progressViewStyle property allows you to customize the appearance of a progress view in your UI.
The progressViewStyle property defines the style of a progress view, allowing you to select a visual representation that best fits your app’s context.
The progressViewStyle property accepts the following string values:
automatic: Uses the default progress view style, adapting to the current context of the view being styled.circular: Displays a circular gauge to indicate the partial completion of an activity. On platforms other than macOS, this style may appear as an indeterminate indicator.linear: Displays a horizontal bar to visually indicate progress.If progressViewStyle is not specified, the default style (automatic) is applied based on the view’s context.
Use these properties to display a progress view for a time-based task:
timerFrom: The starting date range timestamp over which the view progresses.timerTo: The ending date range timestamp over which the view progresses.countsDown (optional): If true (default), the view empties as time passes.label (optional): A view that describes the task in progress.currentValueLabel (optional): A view that describes the level of completed progress of the task.Use these properties to display a progress view for a task with a defined scope:
value (optional): The completed amount of the task to this point, in a range of 0.0 to total, or nil if the progress is indeterminate.total (optional): The full amount representing the complete scope of the task (default is 1.0).title (optional): A title describing the task in progress.label (optional): A view that describes the task in progress.currentValueLabel (optional): A view that describes the level of completed progress of the task.This creates a circular progress view for a timer interval task.
This creates a linear progress view for a task with 50% completion.
progressViewStyle property directly maps to SwiftUI’s progressViewStyle modifier.